package unit4.part2;

/**
 * 4.2.2.值传递与引用传递
 */
public class ValueReferenceTest {
    int i;

    public static void main(String[] args) {
        int a = 3;
        int b = a;
        b = 4;
        System.out.println(a);
        System.out.println(b);
        ValueReferenceTest c = new ValueReferenceTest();
        c.i = 3;
        ValueReferenceTest d = c;
        d.i = 4;
        System.out.println(c.i);
        System.out.println(d.i);
    }
}
